package games.test;

import java.awt.Color;
import java.awt.Rectangle;

import vooga.behaviors.BounceOnBoundsBehavior;
import vooga.behaviors.MoveBehavior;
import vooga.core.AbstractLevel;
import vooga.core.Game;
import vooga.core.Layer;
import vooga.core.Player;
import vooga.core.VoogaView;
import vooga.entities.Entity;
import vooga.geom.Vector;

/**
 * @author Congyi Wu
 * Test level class for testing purposes...
 * Should show off transparent layers
 */
public class Level extends AbstractLevel {
	public static final Rectangle BOUNDS = new Rectangle(0,0,100,100);
	public Level(VoogaView view, Player player)
	{
		super(view, player, BOUNDS);
		setPhysicalSize(BOUNDS.width*5, BOUNDS.height*5);
		Layer bg = new Layer(-1,BOUNDS);
		bg.setBackGroundColor(Color.BLUE);
		addLayer(bg);
		addLayer(new Layer(1,BOUNDS));
		addLayer(new Layer(2,BOUNDS));
	}
	public void init()
	{
		Entity tank = getFirstEntity("tank");
		tank.addBehavior(new BounceOnBoundsBehavior(BOUNDS));
		tank.addBehavior(new MoveBehavior(BOUNDS));
		tank.setVelocity(new Vector(30, .5));
	}
	@Override
	protected void checkGameOver() {
		//endGame();
	}
	@Override
	protected void checkLevelOver() {
		//endGame();
	}
}
